package com.chenxiao.Mediator;

/**
 * @Author: CX
 * @Date: Created in  2024/04/07 14:45
 * @version: v1.0
 * @Description: TODO
 **/
public class MediatorPatternApp {
    public static void main(String[] args) {
        ChatMediator mediator = new ChatRoom();

        User john = new UserImpl(mediator, "John");
        User jane = new UserImpl(mediator, "Jane");

        john.send("Hi there!");
        jane.send("Hey, John!");
    }
}
